package org.hadoop.hdfs.lucene.po;

import java.util.Map;

public class NioResult implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private boolean success;
	private String msg;
	private Map<String,Object> data;
	
	
	public static NioResult SUCCESS(){
		NioResult result = new NioResult();
		result.success = true;
		return result;
	}
	
	public static NioResult SUCCESS(Map<String,Object> data){
		NioResult result = new NioResult();
		result.success = true;
		result.data = data;
		return result;
	}
	
	public static NioResult FAILER(String msg){
		NioResult result = new NioResult();
		result.success = false;
		result.msg = msg;
		return result;
	}
	
	
	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Map<String, Object> getData() {
		return data;
	}
	public void setData(Map<String, Object> data) {
		this.data = data;
	}
	
}
